package com.nbsaas.boot.customer.data.entity;

import com.nbsaas.boot.code.annotation.FormAnnotation;
import com.nbsaas.boot.code.annotation.FormField;
import com.nbsaas.boot.code.annotation.SearchItem;
import com.nbsaas.boot.code.annotation.SimpleClass;
import com.nbsaas.boot.jpa.data.entity.LongEntity;
import com.nbsaas.boot.rest.filter.Operator;
import lombok.Data;
import org.hibernate.annotations.Comment;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;


@FormAnnotation(model = "客户标签")
@SimpleClass
@Data
@Entity
@Table(name = "bs_shop_user_label")
public class CustomerLabel extends LongEntity {

    @SearchItem(name = "name", label = "标签名称")
    @FormField(title = "标签名称", grid = true, required = true)
    @Comment("标签名称")
    @Column(length = 30)
    private String name;


    @SearchItem(name = "shop", label = "来源店铺", operator = Operator.eq, classType = Long.class,show = false)
    @Comment("来源店铺")
    private Long shop;
}
